def bubbleSort(iterable):
    length = len(iterable)
    for i in range(length-1):
        swapped = True
        for j in range(length-1-i):
            if iterable[j]>iterable[j+1]:
                iterable[j],iterable[j+1] = iterable[j+1],iterable[j]
                swapped = False
        if swapped:
            break
    return iterable
print(bubbleSort([3,4,77,232,889,44,76,2,8,54,88,245]))